# server.py
from fastmcp import FastMCP

# 创建MCP服务器实例
mcp = FastMCP("Demo Server")

# 使用装饰器定义工具
@mcp.tool
def add_numbers(a: int, b: int) -> int:
    """将两个数字相加"""
    return a + b

if __name__ == "__main__":
    mcp.run(transport="http")  # 也支持 'sse' 或 'http'